home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / emacs.lha / emacs-19.16 / lisp / version.el < prev    next >
Lisp/Scheme  |  1993-07-06  |  2KB  |  62 lines

  1. ;;; version.el --- record version number of Emacs.
  2.  
  3. ;;; Copyright (C) 1985, 1992 Free Software Foundation, Inc.
  4.  
  5. ;; Maintainer: FSF
  6. ;; Keywords: internal
  7.  
  8. ;; This file is part of GNU Emacs.
  9.  
  10. ;; GNU Emacs is free software; you can redistribute it and/or modify
  11. ;; it under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation; either version 2, or (at your option)
  13. ;; any later version.
  14.  
  15. ;; GNU Emacs is distributed in the hope that it will be useful,
  16. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. ;; GNU General Public License for more details.
  19.  
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with GNU Emacs; see the file COPYING.  If not, write to
  22. ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  
  24. ;;; Code:
  25.  
  26. ;; The following line is modified automatically
  27. ;; by loading inc-version.el, each time a new Emacs is dumped.
  28. (defconst emacs-version "19.16.0" "\
  29. Version numbers of this version of Emacs.")
  30.  
  31. (defconst emacs-build-time (current-time-string) "\
  32. Time at which Emacs was dumped out.")
  33.  
  34. (defconst emacs-build-system (system-name))
  35.  
  36. (defun emacs-version  (&optional here) "\
  37. Return string describing the version of Emacs that is running.
  38. If optional argument HERE is non-nil, insert string at point."
  39.   (interactive "P")
  40.   (let ((version-string 
  41.          (format "GNU Emacs %s of %s %s on %s (%s)"
  42.                  emacs-version
  43.                  (substring emacs-build-time 0
  44.                             (string-match " *[0-9]*:" emacs-build-time))
  45.                  (substring emacs-build-time 
  46.                             (string-match "[0-9]*$" emacs-build-time))
  47.                  emacs-build-system system-type)))
  48.     (if here 
  49.         (insert version-string)
  50.       (if (interactive-p)
  51.           (message "%s" (emacs-version))
  52.         version-string))))
  53.  
  54. ;;; We hope that this alias is easier for people to find.
  55. (fset 'version 'emacs-version)
  56.  
  57. ;;Local variables:
  58. ;;version-control: never
  59. ;;End:
  60.  
  61. ;;; version.el ends here
  62.